package com.ruoyi.project.wxapi.controller;

import com.ruoyi.project.system.dict.domain.DictData;
import com.ruoyi.project.system.dict.service.IDictDataService;
import com.ruoyi.project.wxapi.model.dto.Result;
import io.swagger.annotations.Api;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api("wxapp")
@RestController
@RequestMapping("/wxapi/system")
public class WxapiSystemController {

    @Autowired
    private IDictDataService dictDataService;

    @GetMapping("/dictDataList")
    @ResponseBody
    public Result list(@RequestParam String dictType)
    {
        DictData dictData=new DictData();
        dictData.setDictType(dictType);
        List<DictData> list = dictDataService.selectDictDataList(dictData);
        return Result.success(list);
    }
}
